using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICClassType_BASEMap : EntityTypeConfiguration<ICClassType_BASE>
    {
        public ICClassType_BASEMap()
        {
            // Primary Key
            this.HasKey(t => t.FID);

            // Properties
            this.Property(t => t.FID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FName)
                .IsRequired()
                .HasMaxLength(100);

            this.Property(t => t.FTableName)
                .IsRequired()
                .HasMaxLength(30);

            this.Property(t => t.FImgID)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.FMenuControl)
                .IsRequired()
                .HasMaxLength(2000);

            this.Property(t => t.FFilter)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FBillNoKey)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FLayerNames)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FPrimaryKey)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FEPrimaryKey)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FClassTypeKey)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FIndexKey)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.FComponentExt)
                .IsRequired()
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("ICClassType_BASE");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FShowIndex).HasColumnName("FShowIndex");
            this.Property(t => t.FTableName).HasColumnName("FTableName");
            this.Property(t => t.FShowType).HasColumnName("FShowType");
            this.Property(t => t.FTemplateID).HasColumnName("FTemplateID");
            this.Property(t => t.FImgID).HasColumnName("FImgID");
            this.Property(t => t.FModel).HasColumnName("FModel");
            this.Property(t => t.FLogic).HasColumnName("FLogic");
            this.Property(t => t.FBillWidth).HasColumnName("FBillWidth");
            this.Property(t => t.FBillHeight).HasColumnName("FBillHeight");
            this.Property(t => t.FMenuControl).HasColumnName("FMenuControl");
            this.Property(t => t.FFunctionID).HasColumnName("FFunctionID");
            this.Property(t => t.FFilter).HasColumnName("FFilter");
            this.Property(t => t.FBillTypeID).HasColumnName("FBillTypeID");
            this.Property(t => t.FIsManageBillNo).HasColumnName("FIsManageBillNo");
            this.Property(t => t.FBillNoKey).HasColumnName("FBillNoKey");
            this.Property(t => t.FEntryCount).HasColumnName("FEntryCount");
            this.Property(t => t.FLayerCount).HasColumnName("FLayerCount");
            this.Property(t => t.FLayerNames).HasColumnName("FLayerNames");
            this.Property(t => t.FPrimaryKey).HasColumnName("FPrimaryKey");
            this.Property(t => t.FEPrimaryKey).HasColumnName("FEPrimaryKey");
            this.Property(t => t.FClassTypeKey).HasColumnName("FClassTypeKey");
            this.Property(t => t.FIndexKey).HasColumnName("FIndexKey");
            this.Property(t => t.FObjectType).HasColumnName("FObjectType");
            this.Property(t => t.FObjectID).HasColumnName("FObjectID");
            this.Property(t => t.FGroupIDView).HasColumnName("FGroupIDView");
            this.Property(t => t.FGroupIDManage).HasColumnName("FGroupIDManage");
            this.Property(t => t.FComponentExt).HasColumnName("FComponentExt");
            this.Property(t => t.FBillNoManageType).HasColumnName("FBillNoManageType");
            this.Property(t => t.FAccessoryTypeID).HasColumnName("FAccessoryTypeID");
            this.Property(t => t.FControl).HasColumnName("FControl");
        }
    }
}
